#ifndef _IFEXP_H_
#define _IFEXP_H_
#include "python3/PythonGrammar30TreeConstants.h"
#include "ast/exprType.h"
#include "AstTypes.h"
class IVisitor;
class IfExp;
typedef QSharedPointer<IfExp> IfExpPtr;

class IfExp: public exprType
{
public:
    explicit IfExp(const exprTypePtr& test, const exprTypePtr& body, const exprTypePtr& orelse, int nodeId=JJTIF_EXP);
    virtual ~IfExp();
    
    
    exprTypePtr test();
    void setTest(const exprTypePtr& test);
    
    exprTypePtr body();
    void setBody(const exprTypePtr& body);
    
    exprTypePtr orelse();
    void setOrelse(const exprTypePtr& orelse);
    
    
    virtual Ast::AstTypes type() const;
    virtual QString toString() const;
    virtual void accept(IVisitor* visitor, const SimpleNodePtr& node);
    virtual void traverse(IVisitor* visitor);
private:
    exprTypePtr _test;
    exprTypePtr _body;
    exprTypePtr _orelse;
};




#endif